/* uDig - User Friendly Desktop Internet GIS client
 * http://udig.refractions.net
 * (C) 2004-2008, Refractions Research Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation;
 * version 2.1 of the License.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */
package symbology;

import java.util.ArrayList;

import org.xml.sax.Attributes;

/**
 * TODO Purpose of 
 * <p>
 *
 * </p>
 * @author John
 * @since 1.1.0
 */
public class TestParseXml extends ParseXml {

    public Object processElement(String tag, Attributes attributes, String characters, ArrayList<Object> objects) {
        
        // Indent according to level
        for (int i = 0; i<stack.size(); i++)
            System.out.printf("  ");
        
        // display the element tag
        System.out.printf("%s", tag);
        
        // display the elements
        for (int i=0; i<attributes.getLength(); i++)
            System.out.printf("  %s=%s", attributes.getQName(i), attributes.getValue(i));
        System.out.printf("\n");
                
        return null;
    }   
    
    
    public static void main(String[] args) {
        TestParseXml parser = new TestParseXml();
        try {
            parser.parse(args[0]);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
